package cn.gyxy.service.impl;

import cn.gyxy.Aspect.Bsrizhi;
import cn.gyxy.mapper.ZhigongMapper;
import cn.gyxy.pojo.Zhigong;
import cn.gyxy.service.ZhigongService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ZhiGongServiceimpl implements ZhigongService {
    @Autowired   //数据逻辑层对象注入
    private ZhigongMapper zhigongMapper;
    @Override   //查询
    public List<Zhigong> selectZhiGong(String name) {
        return zhigongMapper.selectZhiGong(name);
    }
    @Override  //查询
    public Zhigong selectId(Integer id) {
        return zhigongMapper.selectId(id);
    }
    @Bsrizhi(operation = "日志业务")
    @Override  //修改
    public int zhiGongupdate(Zhigong zhigong) {
        return zhigongMapper.zhiGongupdate(zhigong);
    }
    @Bsrizhi(operation = "日志业务")
    @Override  //删除
    public int doDeleteById(Integer id) {
        return zhigongMapper.doDeleteById(id);
    }
    @Bsrizhi(operation = "日志业务")
    @Override   //添加
    public void zhigomhAdd(Zhigong zhigong) {
        zhigongMapper.zhigomhAdd(zhigong);
    }
}
